
module.exports = function ($scope, $resource, $modalInstance, item) {

    $scope.currentPage = 1;			//当前页码
    $scope.itemsPerPage = 10;		//每页显示几条
    $scope.getData = function(pageNo){
        var para = {
            'pageNo': pageNo,
            'pageSize': $scope.itemsPerPage,
            'company_code': item.company_code
        }
        $resource('/api/ac/atc/groupService/getGroupList', {}, {}).save(para, function(res){
            if (res.errcode === 0) {
                $scope.groupList = res.data.results;
                $scope.totalItems = res.data.totalRecord;
                $scope.currentPage = pageNo;
            } else {
                toaster.error({title: '', body: '查询信息失败'});
            }
        });
    }
    $scope.getData(1);


    $scope.close = function () {
        $modalInstance.dismiss('cancel');
    }

};